package com.sands.ui.fragment;


import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.sands.R;
import com.sands.base.LazyFragment;

import butterknife.BindView;


public class FragmentDemo extends LazyFragment {


    private String pbc_id = "";
    private SwipeRefreshLayout swipyrefreshlayout;
    public static final String INTENT_INT_INDEX = "index";
    @BindView(R.id.tv_text)
    TextView tv_text;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void onCreateViewLazy(Bundle savedInstanceState) {
        super.onCreateViewLazy(savedInstanceState);
        setContentView(R.layout.fragment_item_layout);
        initView();
    }


    private void initView() {
        tv_text.setText("张楚滨");
        tv_text.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(getActivity(),"hello",Toast.LENGTH_LONG).show();
            }
        });
    }


    public static FragmentDemo newInstance(int tabIndex, boolean isLazyLoad) {

        Bundle args = new Bundle();
        args.putInt(INTENT_INT_INDEX, tabIndex);
        args.putBoolean(LazyFragment.INTENT_BOOLEAN_LAZYLOAD, isLazyLoad);
        FragmentDemo fragment = new FragmentDemo();
        fragment.setArguments(args);
        return fragment;
    }


}
